package cn.com.chengmandian.xh.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 租赁套餐冻结支付合约表
 * </p>
 *
 * @author AutoGenerator
 */
@Getter
@Setter
@TableName("xh_rent_advance_contract")
@ApiModel(value = "XhRentAdvanceContract对象", description = "租赁套餐冻结支付合约表")
public class XhRentAdvanceContract implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("数据id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("合作商ID")
    private Integer merchantsId;

    @ApiModelProperty("合约编号")
    private String contractNo;

    @ApiModelProperty("套餐单号,同时也是实际平台合约ID")
    private String comboOrderNo;

    @ApiModelProperty("关联门店ID")
    private Integer shopId;

    @ApiModelProperty("用户id")
    private Integer memberId;

    @ApiModelProperty("先享套餐ID")
    private Integer advanceId;

    @ApiModelProperty("先享渠道 1-花呗先享 2-信用代扣")
    private Integer advanceChannel;

    @ApiModelProperty("关联租赁电池ID")
    private Integer rentBatteryId;

    @ApiModelProperty("冻结总金额 如 1500")
    private BigDecimal frozenAmount;

    @ApiModelProperty("冻结押金 如 300")
    private BigDecimal frozenDeposit;

    @ApiModelProperty("冻结租金 如 1200")
    private BigDecimal frozenRent;

    @ApiModelProperty("最长解冻日期")
    private Date maxFreeDate;

    @ApiModelProperty("实际解冻日期")
    private Date realFreeDate;

    @ApiModelProperty("最长周期数 如 12")
    private Integer maxCycles;

    @ApiModelProperty("已消费周期数 如 3")
    private Integer costCycles;

    @ApiModelProperty("已消费金额 如 210")
    private BigDecimal costAmount;

    @ApiModelProperty("剩余冻结租金 如 990")
    private BigDecimal balanceAmount;

    @ApiModelProperty("已转支付金额 如 70")
    private BigDecimal paidAmount;

    @ApiModelProperty("临时扣押资金")
    private BigDecimal holdAmount;

    @ApiModelProperty("已退还资金")
    private BigDecimal refundAmount;

    @ApiModelProperty("结算消费资金")
    private BigDecimal closeCostAmount;

    @ApiModelProperty("续租模式 0-不自动续租 1-自动按上次购买套餐续租")
    private Integer renewMode;

    @ApiModelProperty("上次购买套餐ID")
    private Integer lastComboId;

    @ApiModelProperty("合约状态 1-生效中 2-用户取消 3-正常完结 4-结算完毕")
    private Integer status;

    @ApiModelProperty("服务平台订单号")
    private String platformOrderNo;

    @ApiModelProperty("买家账号")
    private String buyerAccount;

    @ApiModelProperty("买家账号id")
    private String buyerId;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("修改时间")
    private Date modifyTime;

}
